import { useMount } from 'ahooks';
import type { TabsProps } from 'antd';
import { Tabs } from 'antd';
import DataReport from './components/data-report/index';
import Chart from './components/index';

const onChange = (key: string) => {
  console.log(key);
};

const items: TabsProps['items'] = [
  {
    key: '1',
    label: '数据报表',
    children: <Chart />,
  },
  {
    key: '2',
    label: '达成明细',
    children: <DataReport />,
  },
];

export default () => {
  useMount(() => {});
  return (
    <div>
      <Tabs defaultActiveKey="1" items={items} onChange={onChange} />
    </div>
  );
};
